package com.tzy.newbank.service;

import com.tzy.newbank.Pojo.Bankuser;
import com.tzy.newbank.utils.BusinessException;
import com.tzy.newbank.utils.NoPowerException;
import com.tzy.newbank.utils.LoginException;
import com.tzy.newbank.utils.TransferErrorException;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author tzy
 * @since 2024-07-15
 */
public interface IBankuserService {


    List<Bankuser> seleteAll() throws BusinessException;

    public Boolean deposit(Bankuser bankuser, Double money) throws BusinessException;
    public Boolean withdrawals(Bankuser bankuser, Double money) throws BusinessException;
    public Boolean transfer(Bankuser bankuser,Bankuser bankuser2,Double money) throws BusinessException, TransferErrorException;

    public Double inquiry(Bankuser bankuser);

    Bankuser inquiryUser(Bankuser bankuser);

    public Boolean register(Bankuser bankuser) throws LoginException;
    public Boolean login(Bankuser bankuser) throws LoginException;
    public Boolean destroyAccount(Bankuser bankuser) throws BusinessException, LoginException;
    public Boolean exist(Bankuser bankuser);

    public Boolean freeze(Bankuser bankuser, Bankuser bankuser2) throws NoPowerException, TransferErrorException;

    public Boolean unfreeze(Bankuser bankuser, Bankuser bankuser2) throws NoPowerException, TransferErrorException;
}
